import React, { Component } from 'react'
import { Pagination } from 'antd'
import { high } from '../../high'

class Homes extends Component {
    render() {
        const { total, list } = this.props
        return (
            <div>
                {
                    list.map((item, index) => {
                        return <p key={index}>
                            {item.title} -- {item.id}
                        </p>
                    })
                }
                {/* defaultCurrent ==> 默认展示第几页 */}
                {/* total 总数量 */}
                <Pagination defaultCurrent={1} onChange = { this.change } total={ total } />
            </div>
        )
    }
}

Homes = high(Homes, "/getPageList")

export default Homes
